namespace Users {
    	using System;
    	
    	
    	/// <summary>
    	/// 表名：uc_UserStatus 主键列：UserId
    	/// </summary>
    	[SerializableAttribute()]
    	public partial class _UserStatus : MySoft.Data.Entity {
    		
    		protected Int32 _UserId;
    		
    		protected DateTime _LastLoginTime;
    		
    		protected String _LastLoginIP;
    		
    		protected Byte _FailedLoginAttempts;
    		
    		protected DateTime _LastFailedLoginTime;
    		
    		public Int32 UserId {
    			get {
    				return this._UserId;
    			}
    			set {
    				this.OnPropertyValueChange(_.UserId, _UserId, value);
    				this._UserId = value;
    			}
    		}
    		
    		public DateTime LastLoginTime {
    			get {
    				return this._LastLoginTime;
    			}
    			set {
    				this.OnPropertyValueChange(_.LastLoginTime, _LastLoginTime, value);
    				this._LastLoginTime = value;
    			}
    		}
    		
    		public String LastLoginIP {
    			get {
    				return this._LastLoginIP;
    			}
    			set {
    				this.OnPropertyValueChange(_.LastLoginIP, _LastLoginIP, value);
    				this._LastLoginIP = value;
    			}
    		}
    		
    		/// <summary>
    		/// 登陆失败尝试次数
    		/// </summary>
    		public Byte FailedLoginAttempts {
    			get {
    				return this._FailedLoginAttempts;
    			}
    			set {
    				this.OnPropertyValueChange(_.FailedLoginAttempts, _FailedLoginAttempts, value);
    				this._FailedLoginAttempts = value;
    			}
    		}
    		
    		/// <summary>
    		/// 最后登陆失时间
    		/// </summary>
    		public DateTime LastFailedLoginTime {
    			get {
    				return this._LastFailedLoginTime;
    			}
    			set {
    				this.OnPropertyValueChange(_.LastFailedLoginTime, _LastFailedLoginTime, value);
    				this._LastFailedLoginTime = value;
    			}
    		}
    		
    		/// <summary>
    		/// 获取实体对应的表名
    		/// </summary>
    		protected override MySoft.Data.Table GetTable() {
    			return new MySoft.Data.Table<_UserStatus>("uc_UserStatus");
    		}
    		
    		/// <summary>
    		/// 获取实体中的主键列
    		/// </summary>
    		protected override MySoft.Data.Field[] GetPrimaryKeyFields() {
    			return new MySoft.Data.Field[] {
    					_.UserId};
    		}
    		
    		/// <summary>
    		/// 获取列信息
    		/// </summary>
    		protected override MySoft.Data.Field[] GetFields() {
    			return new MySoft.Data.Field[] {
    					_.UserId,
    					_.LastLoginTime,
    					_.LastLoginIP,
    					_.FailedLoginAttempts,
    					_.LastFailedLoginTime};
    		}
    		
    		/// <summary>
    		/// 获取列数据
    		/// </summary>
    		protected override object[] GetValues() {
    			return new object[] {
    					this._UserId,
    					this._LastLoginTime,
    					this._LastLoginIP,
    					this._FailedLoginAttempts,
    					this._LastFailedLoginTime};
    		}
    		
    		/// <summary>
    		/// 给当前实体赋值
    		/// </summary>
    		protected override void SetValues(MySoft.Data.IRowReader reader) {
    			if ((false == reader.IsDBNull(_.UserId))) {
    				this._UserId = reader.GetInt32(_.UserId);
    			}
    			if ((false == reader.IsDBNull(_.LastLoginTime))) {
    				this._LastLoginTime = reader.GetDateTime(_.LastLoginTime);
    			}
    			if ((false == reader.IsDBNull(_.LastLoginIP))) {
    				this._LastLoginIP = reader.GetString(_.LastLoginIP);
    			}
    			if ((false == reader.IsDBNull(_.FailedLoginAttempts))) {
    				this._FailedLoginAttempts = reader.GetByte(_.FailedLoginAttempts);
    			}
    			if ((false == reader.IsDBNull(_.LastFailedLoginTime))) {
    				this._LastFailedLoginTime = reader.GetDateTime(_.LastFailedLoginTime);
    			}
    		}
    		
    		public override int GetHashCode() {
    			return base.GetHashCode();
    		}
    		
    		public override bool Equals(object obj) {
    			if ((obj == null)) {
    				return false;
    			}
    			if ((false == typeof(_UserStatus).IsAssignableFrom(obj.GetType()))) {
    				return false;
    			}
    			if ((((object)(this)) == ((object)(obj)))) {
    				return true;
    			}
    			return false;
    		}
    		
    		public class _ {
    			
    			/// <summary>
    			/// 表示选择所有列，与*等同
    			/// </summary>
    			public static MySoft.Data.AllField All = new MySoft.Data.AllField<_UserStatus>();
    			
    			/// <summary>
    			/// 字段名：UserId - 数据类型：Int32
    			/// </summary>
    			public static MySoft.Data.Field UserId = new MySoft.Data.Field<_UserStatus>("UserId");
    			
    			/// <summary>
    			/// 字段名：LastLoginTime - 数据类型：DateTime
    			/// </summary>
    			public static MySoft.Data.Field LastLoginTime = new MySoft.Data.Field<_UserStatus>("LastLoginTime");
    			
    			/// <summary>
    			/// 字段名：LastLoginIP - 数据类型：String
    			/// </summary>
    			public static MySoft.Data.Field LastLoginIP = new MySoft.Data.Field<_UserStatus>("LastLoginIP");
    			
    			/// <summary>
    			/// 登陆失败尝试次数 - 字段名：FailedLoginAttempts - 数据类型：Byte
    			/// </summary>
    			public static MySoft.Data.Field FailedLoginAttempts = new MySoft.Data.Field<_UserStatus>("FailedLoginAttempts");
    			
    			/// <summary>
    			/// 最后登陆失时间 - 字段名：LastFailedLoginTime - 数据类型：DateTime
    			/// </summary>
    			public static MySoft.Data.Field LastFailedLoginTime = new MySoft.Data.Field<_UserStatus>("LastFailedLoginTime");
    		}
    	}
    }
